package com.itheima02;

import java.io.File;
import java.io.IOException;

public class FileTest {
    public static void main(String[] args) throws IOException {
        File f1 = new File("E:\\aaa");
        File f2 = new File("E:\\ab.txt" );
        File f3 = new File("day_demo");
        File f4 = new File("E:\\");
       // f1.mkdir();
       // f2.createNewFile();
       // boolean mkdirs = f3.mkdirs();
        //System.out.println(mkdirs);

        //f3.delete();
        System.out.println(f1.isFile());
        System.out.println(f2.isFile());
        System.out.println(f1.isDirectory());

        System.out.println(f1.getAbsoluteFile());
        System.out.println(f1.getName());
        System.out.println(f2.getPath());

        File[] files = f4.listFiles();
        for (File file : files) {
            System.out.println(file);
        }
    }
}
